Data storage devices are typically random access in that data accessed at a particular location can be modified and then put back in the same location. A file or object may be divided and placed piecemeal in the data storage device in various locations where no data is stored or where data is marked invalid. While this method works well for devices such as a hard disk drive (“HDD”), using random access for solid-state storage can be inefficient and can cause premature failure.
Using random access for solid-state storage can be inefficient because typically writing data often takes much longer than reading data. For flash memory, which is a type of solid-state storage, changing a bit from a “zero” state (“zero”) to a “one” state (“one”) usually takes longer than changing a bit from a one to a zero. This is the case for typical flash memory that uses capacitors as cells where a zero equates to a discharged capacitor in a cell and a one equates to a charged capacitor in a cell. Typically, charging a capacitor takes longer than discharging a capacitor.
Using random access for solid-state storage can lead to premature failure of the solid-state storage because typically each cell in a solid-state storage device can only be written to a certain number of times before the cell begins to fail. Random access typically does not evenly distribute writing data over the solid-state storage so some regions or addresses are used much more than other areas. This overuse of some areas can lead to premature failure of all or a portion of a solid-state storage device.
Typical solid-state storage devices recover un-used storage space much the same way as non-solid-state storage by treating the solid-state storage device as random access and marking unused storage space as available for reuse. This is problematic because the typical storage space recovery methods applied to solid-state storage suffers the inefficiencies and failure tendencies as described above.